# -*- coding: utf-8 -*-
import time
from odoo import api, fields, models, _
import odoo.addons.decimal_precision as dp
from odoo.exceptions import UserError
import calendar


from odoo import http
from odoo.http import content_disposition, dispatch_rpc, request, \
                      serialize_exception as _serialize_exception

class fhtest_tbclue(models.TransientModel):
    _name = 'fhtest.tbclue'
    _description = u'线索'

    fsex=fields.Selection([('0',u'是'),('1',u'否')],u'性别',readonly=False,required=False,translate=False)
    fsource=fields.Many2one('hr.employee',u'线索来源',readonly=False,required=False,translate=False)
    fmobile1= fields.Char(u'标题',readonly=False,required=False,translate=False)
    fmobile2= fields.Char(u'手机2',readonly=False,required=False,translate=False)
    fweixin= fields.Char(u'微信号',readonly=False,required=False,translate=False)
    fqq= fields.Char(u'QQ',readonly=False,required=False,translate=False)
    femail= fields.Char(u'邮箱',readonly=False,required=False,translate=False)
    fregion=fields.Many2one('hr.employee',u'地区',readonly=False,required=False,translate=False)
    faddress= fields.Char(u'地址',readonly=False,required=False,translate=False)
    fstate=fields.Selection([('0',u'是'),('1',u'否')],u'状态',readonly=False,required=False,translate=False)
    ffollowuptime=fields.Datetime(u'下次跟进时间',readonly=False,required=False,translate=False)
    fremarks=fields.Text(u'备注',readonly=False,required=False,translate=False)
    fsubordinate=fields.Many2one('hr.employee',u'所属部门',readonly=False,required=False,translate=False)

    def ziyuanxd_fdcrm_create(self):
        model_data = self.env['ir.model.data']
        model_self=super(fhtest_tbclue, self).read()[0]
			
		
        domaincontext=[]
				
			
        value = {
            'view_type': 'form',
            'view_mode': 'tree,form',
            'res_model': 'fhtest.weishui001',
            'res_id': 1,
            'views': [(False, 'tree'),(False, 'form')],
            'type': 'ir.actions.act_window',
            #'domain':domaincontext ,					
        }		
		
        return value
    def ziyuanxd_fdcrm_create002(self):

        return True
    def ziyuanxd_fdcrm_create003(self):
	
        return True
    @api.multi
    def ziyuanxd_fdcrm_create004(self):
        '''action = {
            'name': 'FEC',
            'type': 'ir.actions.act_url',
            'url': "web?debug=1#menu_id=71&action=78",
            'target': 'self',
            }
        return action'''
        #print('-------------综合监控:-------------')
        #request.session.test="9999"

        return True	
    
fhtest_tbclue()
